﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Taxes
{
    public partial class Main : System.Web.UI.Page
    {
        Model.ysys_user userInfo = new Model.ysys_user();
        protected void Page_Load(object sender, EventArgs e)
        {
            //验证是否登录
            if (Session["curr_user"] == null)
            {
                Response.Redirect("Default.aspx");
            }
            userInfo = Session["curr_user"] as Model.ysys_user;

            pnTop.Html = "<div id='header' style='height:32px;'><a style='float:right;margin-right:10px;' href='Users/LoginOut.aspx'><img style='margin-top: 4px;' src='images/botton_gif_037.gif'/></a><div class='api-title'>个体工商户纳税评估系统<span class='api-dept'>" + string.Format("{0}{1}管理员", userInfo.user_department, userInfo.user_tname) + "</span></div></div>";
            if (userInfo.user_type != 1)
            {
                MenuPanel3.Visible = false;
            }
            else 
            {
                if (userInfo.user_name == "admin")
                {
                    MenuPanel1.Visible = false;
                    MenuPanel2.Visible = false;
                    MenuPanel4.Visible = false;
                    MenuItem9.Visible = false;
                }
            }
        }
    }
}